<?php
/*
 * Creative Bulletin Board Generation 3
 * Version 1.0 Beta 1
 +------------------------------------
 * User Application Models: Permission Masks
 * Started: September 21, 2009 2:20 PM
 * Script version: 1.0
 */
class permissionmasks{
	public function create($name, $desc = ""){
		global $db, $main;
		$name = $main->secure_string(substr($name, 0, 254));
		$desc = $main->secure_string($desc);
		$built = "INSERT INTO `".DB_PREFIX."permission_masks` (
			`id`, `name`, `description`)
			VALUES(NULL, '{$name}', '{$desc}')";
		$query = $db->query($built);
		return $query;
	}
	
	public function select_all(){
		global $db;
		$query = $db->select("permission_masks");
		return $query;
	}
}
